import request from '../utils/request'

function loginPassword(data){
  return request({
    url:'/front/member/login/password',
    method:'post',
    data
  })
}

function loginCode(data){
  return request({
    url:'/front/member/login/code',
    method:'post',
    data
  })
}

function sendEmailCode(data){
  return request({
    url:'/front/member/sendEmailCode',
    method:'get',
    params:data
  })
}

function changePassword(data){
  return request({
    url:'/front/member/changePassword',
    method:'post',
    data
  })
}

function update(data){
  return request({
    url:'/front/member/update',
    method:'post',
    data
  })
}

function getInfoByToken(data){
  return request({
    url:'/front/member/getInfoByToken',
    method:'get',
    params:data
  })
}

function info(data){
  return request({
    url:'/front/member/info/'+data,
    method:'get'
  })
}
function getMemberOthers(data){
  return request({
    url:'/front/member/getMemberOthers/'+data,
    method:'get'
  })
}

export default {loginPassword,loginCode, getInfoByToken,info,getMemberOthers,changePassword,update,sendEmailCode}